# -*- coding: utf-8 -*-
from pymongo import MongoClient

# api与mongodb的接口
def _get_db():
    client = MongoClient("localhost", 27017)
    db = client.stock
    return db

_db = _get_db()

def get_db():
    return _db